<template lang="jade">
#new-books
    //- .header
      a.backup.icon-angle-left(href='javascript:history.go(-1)')
      h1.page-title 推荐阅读
    .top-tips
      i.icon-fire 最受欢迎新书推荐
    .newbook-list
      .list-item(v-for="book in bookList")
        .weui-media-box.weui-media-box_appmsg
          .weui-media-box__hd
            img.weui-media-box__thumb(:src='book.cover')
          .weui-media-box__bd
            h3.books-name {{book.name}}
            .author 作者  {{book.author}}
            .publishing-company 出版社：{{book.publisher}}
            .publishing-date 出版日期：{{book.publishDate}}
            .type 文献类型：{{book.type}}
            a.btn-green.weui-btn.weui-btn_mini.weui-btn_primary(@click.prevent.stop="viewBook(book.id)") 查看
</template>

<script>
export default {
  data () {
    return {
      bookList: [
        {
          id: 144,
          name: '练习的心态',
          author: '[英] 朱尔斯•埃文斯 / 贝小戎',
          cover: 'static/images/3.jpg',
          publisher: '电子工业出版社',
          publishDate: '2013',
          type: '图书'
        }
      ]
    }
  },
  methods: {
    viewBook (id) {
      this.$router.push({
        name: 'bookInfo',
        params: {
          bookId: id
        }
      })
    }
  }
}
</script>
